<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
	<meta charset="utf-8" />
		<title>收付日报</title>		
		
			<script type="text/javascript" src="plugins/websocketInstantMsg/ext4/ext-all-debug.js"></script>
			<script type="text/javascript" src="static/js/jquery-1.7.2.js" />
			<script type="text/javascript" src="plugins/websocketInstantMsg/ext4/locale/ext-lang-zh_CN.js"></script>
			<link rel="stylesheet" href="plugins/websocketInstantMsg/ext4/resources/css/ext-all.css" />
			
			
</head>
<body class="no-skin">
<%-- 		<base href="<%=basePath%>"> --%>
<!-- 	<div class="main-container" id="main-container"style="overflow-x:scroll"> -->
<!-- 		<div class="main-content"> -->
<!-- 			<div class="main-content-inner"> -->
<!-- 				<div class="page-content"> -->
<!-- 					<div class="row"> -->
<!-- 						<div class="col-xs-12"> -->
						
<!-- 						</div> -->
<!-- 					</div> -->
<!-- 				</div> -->
<!-- 			</div> -->
<!-- 		</div> -->
<!-- 	</div> -->

<!-- <div id="my-tabs"></div> -->
<!-- <div id="panel"></div> -->
<!-- <div id="receivables"></div> -->
<!-- <div id="payment"></div> -->
<!-- <div id="panel2"></div> -->
<!-- <div id="test1"></div> -->
<!-- <div id="test2"></div> -->

<!-- <div id="tab1" class="x-hide-display">收付预报</div> -->
<!-- <div id="tab2" class="x-hide-display">收付日报</div> -->
</body>
<script type="text/javascript">
Ext.onReady(function(){
	Ext.QuickTips.init();
	var selModel = Ext.create('Ext.selection.CheckboxModel',{checkOnly:false});
	  var columns = [ 
						{text:'ID',dataIndex:'ID',hidden:true},
		                 {text:'单位',dataIndex:'UIIT'}, //sortable:true 可设置是否为该列进行排序  
		                 {text:'币制',dataIndex:'CURRENCY'},  
		                 {text:'金额',dataIndex:'AMOUNT'}, 
		                 {text:'收款银行',dataIndex:'RECEIVABLES_BANK'}, 
		                 {text:'收款时间',dataIndex:'RECEIVABLES_TIME'}, 
		                 {text:'部门',dataIndex:'DEPARTMENT'}, 
		                 {text:'销售人员',dataIndex:'SALES_PERSONL'}, 
		                 {text:'业务类别',dataIndex:'BUSINESS_TYPE'}, 
		                 {text:'缴款单号',dataIndex:'PAYMENT_NUM'}, 
		                 {text:'制单号',dataIndex:'MAKE_NUM'}, 

		               ]; 
	  Ext.define('store', {
			extend : 'Ext.data.Model',
			fields :[  
				   {
	   		name:'ID'
	   	},  {
	   	    name: 'UIIT'
	   	},{
	   	    name : 'CURRENCY'
	   	},{
	   	    name : 'AMOUNT'
	   	},{
	   	    name : 'RECEIVABLES_BANK'
	   	}
	   	,{
	   	    name : 'RECEIVABLES_TIME'
	   	},{
	   	    name : 'DEPARTMENT'
	   	},{
	   	    name : 'SALES_PERSONL'
	   	},{
	   	    name : 'BUSINESS_TYPE'
	   	},{
	   	    name : 'PAYMENT_NUM'
	   	},{
	   	    name : 'MAKE_NUM'
	   	}
				]
		});
	  var store = Ext.create('Ext.data.Store', {
			model : 'store',
			pageSize:10,
//			pageSize : thePageSize,
			id:'store',
			proxy : {
				type : 'ajax',
				actionMethods : {
					read : 'POST'
				},//将提交方式改为post
				url : '<%=basePath%>tellerManage/findPaymentDayPaperInfo',
				reader : {
					type : 'json',
					root: 'result.list',  //数据
	                totalProperty: 'result.total' //数据总条数
				}
			}
		});
	  store.load({ params:{start : 0,limit : 10}}); 
	  var paging = new Ext.PagingToolbar(
				{
					store : store,
					 pageSize:10,
					displayInfo : true,
					displayMsg : '<span style="color:blue;">第{0}条</span>至<span style="color:blue;">{1}条</span>，共<span style="color:blue;">{2}</span>条记录',
					emptyMsg : '无记录'
				});
		var grid = new Ext.grid.GridPanel({
			region:'center',
// 			layout: "fit",
			title:"收款",
			
		    width:'100%',
		    store:store,
// 		    layout: "fit",  
// 		    height:230,
// 			height:'50%',
// 		    forceFit:true,
// 			width: '96%',
//             height: 300,
		    columns:columns,
		    id:'grid',
		    selModel:selModel,
// 		    collapsible: true,
// 		    columnLines: true,
// 		    menuDisabled:true,
		     bbar : paging,
// 		     tbar: [edit,deleteInfo],
		    viewConfig:{enableTextSelection:true,stripeRows: true},
// 		    renderTo:'receivables',
		});
		
		
		
		
		
		
		
		var selModel1 = Ext.create('Ext.selection.CheckboxModel',{checkOnly:false});
		  var columns1 = [ 
							{text:'ID',dataIndex:'ID',hidden:true},
			                 {text:'单位',dataIndex:'UIIT'}, //sortable:true 可设置是否为该列进行排序  
			                 {text:'币制',dataIndex:'CURRENCY'},  
			                 {text:'金额',dataIndex:'AMOUNT'},  
			                 {text:'收款时间',dataIndex:'RECEIVABLES_TIME'}, 
			                 {text:'部门',dataIndex:'DEPARTMENT'},  
			                 {text:'业务类别',dataIndex:'BUSINESS_TYPE'}, 
			                 {text:'缴款单号',dataIndex:'PAYMENT_NUM'}, 
			                 {text:'制单号',dataIndex:'MAKE_NUM'}, 

			               ]; 
		  Ext.define('store1', {
				extend : 'Ext.data.Model',
				fields :[  
					   {
		   		name:'ID'
		   	},  {
		   	    name: 'UIIT'
		   	},{
		   	    name : 'CURRENCY'
		   	},{
		   	    name : 'AMOUNT'
		   	}
		   	,{
		   	    name : 'RECEIVABLES_TIME'
		   	},{
		   	    name : 'DEPARTMENT'
		   	},{
		   	    name : 'BUSINESS_TYPE'
		   	},{
		   	    name : 'PAYMENT_NUM'
		   	},{
		   	    name : 'MAKE_NUM'
		   	}
					]
			});
		  var store1 = Ext.create('Ext.data.Store', {
				model : 'store1',
				pageSize:10,
//				pageSize : thePageSize,
				id:'store1',
				proxy : {
					type : 'ajax',
					actionMethods : {
						read : 'POST'
					},//将提交方式改为post
					url : '<%=basePath%>tellerManage/findpaymentMoneyPaperInfo',
					reader : {
						type : 'json',
						root: 'result.list',  //数据
		                totalProperty: 'result.total' //数据总条数
					}
				}
			});
		  store1.load(); 
		  var paging1 = new Ext.PagingToolbar(
					{
						store : store1,
						 pageSize:10,
						displayInfo : true,
						displayMsg : '<span style="color:blue;">第{0}条</span>至<span style="color:blue;">{1}条</span>，共<span style="color:blue;">{2}</span>条记录',
						emptyMsg : '无记录'
					});
			var grid1 = new Ext.grid.GridPanel({
				region:'south',
				title:"付款",
				width:'100%',
				 height: '50%',
// 			    width:'20%',
// 				height:'50%',
			    store:store1,
// 			    layout: "fit",  
// 			    collapsible: true,
// 			    forceFit:true,
			    columns:columns1,
// 			    width:'100%',
//                 height: '50%',
			    id:'grid1',
			    selModel:selModel1,
// 			    columnLines: true,
// 			    menuDisabled:true,
			     bbar : paging1,
	 		     
			    viewConfig:{enableTextSelection:true,stripeRows: true},
// 			    renderTo:'payment',
			});
			

			
			
			
			
			var selModel2 = Ext.create('Ext.selection.CheckboxModel',{checkOnly:false});
			  var columns2 = [ 
								{text:'ID',dataIndex:'ID',hidden:true},
				                 {text:'单位',dataIndex:'UIIT'}, //sortable:true 可设置是否为该列进行排序  
				                 {text:'币制',dataIndex:'CURRENCY'},  
				                 {text:'金额',dataIndex:'AMOUNT'}, 
				                 {text:'收款银行',dataIndex:'RECEIVABLES_BANK'}, 
				                 {text:'收款时间',dataIndex:'RECEIVABLES_TIME'}, 
				                 {text:'部门',dataIndex:'DEPARTMENT'}, 
				                 {text:'销售人员',dataIndex:'SALES_PERSONL'}, 
				                 {text:'业务类别',dataIndex:'BUSINESS_TYPE'}, 
				                 {text:'缴款单号',dataIndex:'PAYMENT_NUM'}, 
				                 {text:'制单号',dataIndex:'MAKE_NUM'}, 

				               ]; 
			  Ext.define('store2', {
					extend : 'Ext.data.Model',
					fields :[  
						   {
			   		name:'ID'
			   	},  {
			   	    name: 'UIIT'
			   	},{
			   	    name : 'CURRENCY'
			   	},{
			   	    name : 'AMOUNT'
			   	},{
			   	    name : 'RECEIVABLES_BANK'
			   	}
			   	,{
			   	    name : 'RECEIVABLES_TIME'
			   	},{
			   	    name : 'DEPARTMENT'
			   	},{
			   	    name : 'SALES_PERSONL'
			   	},{
			   	    name : 'BUSINESS_TYPE'
			   	},{
			   	    name : 'PAYMENT_NUM'
			   	},{
			   	    name : 'MAKE_NUM'
			   	}
						]
				});
			  var store2 = Ext.create('Ext.data.Store', {
					model : 'store2',
					pageSize:10,
//					pageSize : thePageSize,
					id:'store2',
					proxy : {
						type : 'ajax',
						actionMethods : {
							read : 'POST'
						},//将提交方式改为post
						url : '<%=basePath%>tellerManage/findPaymentDayPaper',
						reader : {
							type : 'json',
							root: 'result.list',  //数据
			                totalProperty: 'result.total' //数据总条数
						}
					}
				});
			  store2.load(); 
			  var paging2 = new Ext.PagingToolbar(
						{
							store : store2,
							 pageSize:10,
							displayInfo : true,
							displayMsg : '<span style="color:blue;">第{0}条</span>至<span style="color:blue;">{1}条</span>，共<span style="color:blue;">{2}</span>条记录',
							emptyMsg : '无记录'
						});
				var grid2 = new Ext.grid.GridPanel({
					region:'center',
					title:"收款日报",
				    width:'100%',
				    store:store2,
// 				    layout: "fit",  
// 					height:'50%',
				    columns:columns2,
				    id:'grid2',
				    selModel:selModel2,
// 				    collapsible: true,
				     bbar : paging2,
//		 		     tbar: [edit,deleteInfo],
				    viewConfig:{enableTextSelection:true,stripeRows: true},
// 				    renderTo:'test1',
				});
				
				
				
				
				
				
				var selModel3 = Ext.create('Ext.selection.CheckboxModel',{checkOnly:false});
				  var columns3 = [ 
									{text:'ID',dataIndex:'ID',hidden:true},
					                 {text:'单位',dataIndex:'UIIT'}, //sortable:true 可设置是否为该列进行排序  
					                 {text:'币制',dataIndex:'CURRENCY'},  
					                 {text:'金额',dataIndex:'AMOUNT'},  
					                 {text:'收款时间',dataIndex:'RECEIVABLES_TIME'}, 
					                 {text:'部门',dataIndex:'DEPARTMENT'},  
					                 {text:'业务类别',dataIndex:'BUSINESS_TYPE'}, 
					                 {text:'缴款单号',dataIndex:'PAYMENT_NUM'}, 
					                 {text:'制单号',dataIndex:'MAKE_NUM'}, 

					               ]; 
				  Ext.define('store3', {
						extend : 'Ext.data.Model',
						fields :[  
							   {
				   		name:'ID'
				   	},  {
				   	    name: 'UIIT'
				   	},{
				   	    name : 'CURRENCY'
				   	},{
				   	    name : 'AMOUNT'
				   	}
				   	,{
				   	    name : 'RECEIVABLES_TIME'
				   	},{
				   	    name : 'DEPARTMENT'
				   	},{
				   	    name : 'BUSINESS_TYPE'
				   	},{
				   	    name : 'PAYMENT_NUM'
				   	},{
				   	    name : 'MAKE_NUM'
				   	}
							]
					});
				  var store3 = Ext.create('Ext.data.Store', {
						model : 'store3',
						pageSize:10,
//						pageSize : thePageSize,
						id:'store3',
						proxy : {
							type : 'ajax',
							actionMethods : {
								read : 'POST'
							},//将提交方式改为post
							url : '<%=basePath%>tellerManage/findpaymentMoneyPaper',
							reader : {
								type : 'json',
								root: 'result.list',  //数据
				                totalProperty: 'result.total' //数据总条数
							}
						}
					});
				  store3.load(); 
				  var paging3 = new Ext.PagingToolbar(
							{
								store : store3,
								 pageSize:10,
								displayInfo : true,
								displayMsg : '<span style="color:blue;">第{0}条</span>至<span style="color:blue;">{1}条</span>，共<span style="color:blue;">{2}</span>条记录',
								emptyMsg : '无记录'
							});
					var grid3 = new Ext.grid.GridPanel({
		 				region:'south',
						title:"付款日报",
//		 			    width:'20%',
//		 				height:'50%',
					    store:store3,
// 					    layout: "fit",  
// 					    collapsible: true,
//		 			    forceFit:true,
					    columns:columns3,
// 					    width:'100%',
// 		                height: '50%',
					    id:'grid3',
					    selModel:selModel3,
//		 			    columnLines: true,
//		 			    menuDisabled:true,
					     bbar : paging3,
			 		     
					    viewConfig:{enableTextSelection:true,stripeRows: true},
// 					    renderTo:'test2',
					});
			  var tabs = new Ext.TabPanel({
				  renderTo: Ext.getBody(),

		            activeTab:0,
		            deferredRender:true,

		            items: [
		                    { title: '收付预报',items:[grid,grid1],listeners: {  
		                        'show': function (t, eOpts) {  
// 		                           $("#grid-body").hide();
// 		                           $("#grid_header").hide();
		                        }  
		                    }  },
		                    { title: '收付日报',items:[grid2,grid3],listeners: {  
		                        'show': function (t, eOpts) {  
// 		                        	$("#grid-body").hide();
// 		                        	$("#grid_header").hide();
		                        }  
		                    }  }
		            ]
		        });
			  new Ext.Viewport({   
				  layout : 'border',	
			        items: [tabs]   
			    });   
});
</script>
</html>